﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class newAlbum : Form
    {
        private bool _useTagName = false;

        public bool useTagName
        {
            get { return _useTagName; }
        }
        public newAlbum()
        {
            this.CenterToParent();
            InitializeComponent();
           
        }

        public string tagName
        {
            get { return textBox1.Text; }
        }

        private void cancel_Click(object sender, EventArgs e)
        {
            _useTagName = false;
            Close();
        }
        
        private void ok_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Equals(""))
            {
                _useTagName = false;
                MessageBox.Show("Please enter a name for your picture album");
            }
            else 
            {
                _useTagName = true;
                Close();
            }
        }

        private void newAlbum_KeyPress(object sender, KeyPressEventArgs e)
        {

        }

        private void newAlbum_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                ok_Click(null, null);
            }
        }



     

    
    }
}
